<?php 
//$iframe_url="/admin.html";
$iframe_url="/?pageName=admin";
//$homepage = file_get_contents('http://butterflyportal.app.com'.$iframe_url);
//echo $homepage;


if (true) {
?>



<iframe id="ifr" frameborder="0" src="<?php echo $iframe_url; ?>" width="100%"  style="border-width: 0px;" scrolling="no"></iframe>

<script type="text/javascript">
    function iframeHeight() {
        var newHeight = $(window).height();
        var buffer = 180;     // space required for any other elements on the page
        var newIframeHeight = newHeight - buffer;
        $('#ifr').css('height',newIframeHeight);    //this will aply to all iframes on the page, so you may want to make your jquery selector more specific.
    }

    // When DOM ready
    $(function() {
      iframeHeight();
    })
    

  
</script>
<?php } ?>